﻿<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
            AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" 
            DataKeyNames="DomainId" DataSourceID="SqlDataSource1" ForeColor="#333333" 
            GridLines="None">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" 
                    ShowSelectButton="True" />
                <asp:BoundField DataField="DomainId" HeaderText="DomainId" ReadOnly="True" 
                    SortExpression="DomainId" />
                <asp:BoundField DataField="Description" HeaderText="Description" 
                    SortExpression="Description" />
                <asp:BoundField DataField="CreatedBy" HeaderText="CreatedBy" 
                    SortExpression="CreatedBy" />
                <asp:BoundField DataField="ModifiedBy" HeaderText="ModifiedBy" 
                    SortExpression="ModifiedBy" />
                <asp:BoundField DataField="CreatedOn" HeaderText="CreatedOn" 
                    SortExpression="CreatedOn" />
                <asp:BoundField DataField="ModifiedOn" HeaderText="ModifiedOn" 
                    SortExpression="ModifiedOn" />
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
    
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:LiteDynamic2ConnectionString %>" 
        DeleteCommand="DELETE FROM [Domain] WHERE [DomainId] = @DomainId" 
        InsertCommand="INSERT INTO [Domain] ([DomainId], [Description], [CreatedBy], [ModifiedBy], [CreatedOn], [ModifiedOn]) VALUES (@DomainId, @Description, @CreatedBy, @ModifiedBy, @CreatedOn, @ModifiedOn)" 
        SelectCommand="SELECT * FROM [Domain]" 
        UpdateCommand="UPDATE [Domain] SET [Description] = @Description, [CreatedBy] = @CreatedBy, [ModifiedBy] = @ModifiedBy, [CreatedOn] = @CreatedOn, [ModifiedOn] = @ModifiedOn WHERE [DomainId] = @DomainId">
        <DeleteParameters>
            <asp:Parameter Name="DomainId" Type="String" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="DomainId" Type="String" />
            <asp:Parameter Name="Description" Type="String" />
            <asp:Parameter Name="CreatedBy" Type="String" />
            <asp:Parameter Name="ModifiedBy" Type="String" />
            <asp:Parameter DbType="DateTime2" Name="CreatedOn" />
            <asp:Parameter DbType="DateTime2" Name="ModifiedOn" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="Description" Type="String" />
            <asp:Parameter Name="CreatedBy" Type="String" />
            <asp:Parameter Name="ModifiedBy" Type="String" />
            <asp:Parameter DbType="DateTime2" Name="CreatedOn" />
            <asp:Parameter DbType="DateTime2" Name="ModifiedOn" />
            <asp:Parameter Name="DomainId" Type="String" />
        </UpdateParameters>
    </asp:SqlDataSource>
    </form>
</body>
</html>
